﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;

namespace Http
{
    class HttpTcpClient 
    {
        WebClient client;
        NetworkStream stream;
        Byte[] data;
        string url;

        public bool IsConnected
        {
            get { throw new NotImplementedException(); }
        }

        public int TimeOut
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }
        

        public void open(string url, int port)
        {
            throw new NotImplementedException();
        }

        public void open(string url)
        {
            client = new WebClient();
            client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
            this.url = url;

            
        }

        public void Close()
        {
            throw new NotImplementedException();
        }

        public void Send(string command)
        {

            throw new NotImplementedException();
        }

        public string Receive()
        {
             return client.DownloadString(url);
        }

       public System.Net.Sockets.NetworkStream GetStream()
         {
              throw new NotImplementedException();
         }

     
        public string ConnectionTest(string url, int port)
        {
            throw new NotImplementedException();
        }
    }
}
